package org.jivesoftware.smackx.packet;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
import org.jivesoftware.smack.packet.PacketExtension;

public class DelayInformation
  implements PacketExtension
{
  public static final DateFormat XEP_0091_UTC_FORMAT = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
  private String from;
  private String reason;
  private Date stamp;

  static
  {
    XEP_0091_UTC_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
  }

  public DelayInformation(Date paramDate)
  {
    this.stamp = paramDate;
  }

  public String getElementName()
  {
    return "x";
  }

  public String getFrom()
  {
    return this.from;
  }

  public String getNamespace()
  {
    return "jabber:x:delay";
  }

  public String getReason()
  {
    return this.reason;
  }

  public Date getStamp()
  {
    return this.stamp;
  }

  public void setFrom(String paramString)
  {
    this.from = paramString;
  }

  public void setReason(String paramString)
  {
    this.reason = paramString;
  }

  // ERROR //
  public String toXML()
  {
    // Byte code:
    //   0: new 64	java/lang/StringBuilder
    //   3: dup
    //   4: invokespecial 65	java/lang/StringBuilder:<init>	()V
    //   7: astore_1
    //   8: aload_1
    //   9: ldc 67
    //   11: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   14: aload_0
    //   15: invokevirtual 73	org/jivesoftware/smackx/packet/DelayInformation:getElementName	()Ljava/lang/String;
    //   18: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   21: ldc 75
    //   23: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   26: aload_0
    //   27: invokevirtual 77	org/jivesoftware/smackx/packet/DelayInformation:getNamespace	()Ljava/lang/String;
    //   30: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   33: ldc 79
    //   35: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   38: pop
    //   39: aload_1
    //   40: ldc 81
    //   42: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   45: pop
    //   46: getstatic 25	org/jivesoftware/smackx/packet/DelayInformation:XEP_0091_UTC_FORMAT	Ljava/text/DateFormat;
    //   49: astore 4
    //   51: aload 4
    //   53: monitorenter
    //   54: aload_1
    //   55: getstatic 25	org/jivesoftware/smackx/packet/DelayInformation:XEP_0091_UTC_FORMAT	Ljava/text/DateFormat;
    //   58: aload_0
    //   59: getfield 44	org/jivesoftware/smackx/packet/DelayInformation:stamp	Ljava/util/Date;
    //   62: invokevirtual 85	java/text/DateFormat:format	(Ljava/util/Date;)Ljava/lang/String;
    //   65: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   68: pop
    //   69: aload 4
    //   71: monitorexit
    //   72: aload_1
    //   73: ldc 79
    //   75: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   78: pop
    //   79: aload_0
    //   80: getfield 51	org/jivesoftware/smackx/packet/DelayInformation:from	Ljava/lang/String;
    //   83: ifnull +32 -> 115
    //   86: aload_0
    //   87: getfield 51	org/jivesoftware/smackx/packet/DelayInformation:from	Ljava/lang/String;
    //   90: invokevirtual 91	java/lang/String:length	()I
    //   93: ifle +22 -> 115
    //   96: aload_1
    //   97: ldc 93
    //   99: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   102: aload_0
    //   103: getfield 51	org/jivesoftware/smackx/packet/DelayInformation:from	Ljava/lang/String;
    //   106: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   109: ldc 79
    //   111: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   114: pop
    //   115: aload_1
    //   116: ldc 95
    //   118: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   121: pop
    //   122: aload_0
    //   123: getfield 57	org/jivesoftware/smackx/packet/DelayInformation:reason	Ljava/lang/String;
    //   126: ifnull +22 -> 148
    //   129: aload_0
    //   130: getfield 57	org/jivesoftware/smackx/packet/DelayInformation:reason	Ljava/lang/String;
    //   133: invokevirtual 91	java/lang/String:length	()I
    //   136: ifle +12 -> 148
    //   139: aload_1
    //   140: aload_0
    //   141: getfield 57	org/jivesoftware/smackx/packet/DelayInformation:reason	Ljava/lang/String;
    //   144: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   147: pop
    //   148: aload_1
    //   149: ldc 97
    //   151: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   154: aload_0
    //   155: invokevirtual 73	org/jivesoftware/smackx/packet/DelayInformation:getElementName	()Ljava/lang/String;
    //   158: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   161: ldc 95
    //   163: invokevirtual 71	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   166: pop
    //   167: aload_1
    //   168: invokevirtual 100	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   171: areturn
    //   172: astore 5
    //   174: aload 4
    //   176: monitorexit
    //   177: aload 5
    //   179: athrow
    //
    // Exception table:
    //   from	to	target	type
    //   54	72	172	finally
    //   174	177	172	finally
  }
}